#!/usr/bin/perl -w
use strict;
use FindBin;
use lib ("$FindBin::Bin/..", "/net/cpp-group/Leo/bin");
use Cwd 'abs_path';

(my $my_dir = $FindBin::Bin) =~ s/(.*)\/$/$1/;

print STDERR <<"HEADLINE";
888888888888888888888888888888888888888888888888888888888888888888888

    table_genome_genome_align

	Description:

888888888888888888888888888888888888888888888888888888888888888888888

HEADLINE

#-----------------------------------------------------------------------------------------
#	Get DB parameters
#
use db_parameters;
use ortho_species;
#
#	Get DB parameters
#-----------------------------------------------------------------------------------------



my $dbh = connect_to_panda();
use get_psql_time;
my $start_time = get_psql_time($dbh);

for my $species($ortho_name1, $ortho_name2)
{
	my $output_dir = abs_path("$my_dir/../sequences/$species");
	print STDERR "$my_dir/../sequences/$species\n";
	print STDERR "\tcreate directory $output_dir\n";
	system("mkdir -p $output_dir");
	system("$my_dir/write_species_sequences_identifiers.pl ".
					"--species $species ".
					"--directory $output_dir ");
}

log_pipeline_stage($dbh, $curr_protocol_id, 30, 'Get sequences and identifiers', $start_time);
$dbh->disconnect();

